package com.xy.example1;

/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/14 9:50
 * @description
 */
public class Client {
    public static void main(String[] args) {
        WebSiteFactory webSiteFactory = WebSiteFactory.getInstance();
        // 以新闻形式发布网站
        WebSite web1 = webSiteFactory.getWebSite("新闻");
        // 以博客形式发布网站
        WebSite web2 = webSiteFactory.getWebSite("博客");
        // 以公众号形式发布网站
        WebSite web3 = webSiteFactory.getWebSite("公众号");
        web1.use(new User("jack"));
        web2.use(new User("tom"));
        web3.use(new User("marry"));
        WebSite web4 = webSiteFactory.getWebSite("公众号");
        web4.use(new User("lily"));
        WebSite web5 = webSiteFactory.getWebSite("公众号");
        WebSite web6 = webSiteFactory.getWebSite("公众号");
        System.out.println(webSiteFactory.getWebSiteCount());
    }
}
